package cn.kgc.househou.controller;

import cn.kgc.househou.pojo.Housetype;
import cn.kgc.househou.pojo.ResultEntity;
import cn.kgc.househou.service.HousetypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@CrossOrigin
@RestController
@Api(tags = "房行信息表",description = "提供用户相关的Rest API")
public class HousetypeController {

    @Resource
    HousetypeService housetypeService;

   @ApiOperation("房屋信息表")
   @RequestMapping("/seleHousetype")
   public ResultEntity<List<Housetype>> sele(){
       List<Housetype> sele = housetypeService.sele();
       return ResultEntity.successWithoutData(sele);
   }
}
